package handlers;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;

import consultoria.commands.views.ConsultoriaObjectsView;

public class DeleteSelectionHandler extends AbstractHandler {

	@Override
	public Object execute(ExecutionEvent event) throws ExecutionException {
		IWorkbenchPart activPart = HandlerUtil.getActivePart(event);
		if(activPart instanceof ConsultoriaObjectsView){
			ConsultoriaObjectsView consul = (ConsultoriaObjectsView) activPart;
			
			 IStructuredSelection iStructured = (IStructuredSelection)activPart.getSite().getSelectionProvider().getSelection();
			 iStructured.toList();
		}
		System.out.println("deletou");
		return null;
	}

}
